/*
 * SPDX-FileCopyrightText: 2025 UnionTech Software Technology Co., Ltd.
 *
 * SPDX-License-Identifier: GPL-2.0-or-later
 */
#[derive(Debug)]
pub struct IpmiEventSensorType {
    pub code: u8,
    pub offset: u8,
    pub data: u8,
    pub desc: &'static str,
}

pub const ALL_OFFSETS_SPECIFIED: u8 = 0xff;

pub const GENERIC_EVENT_TYPES: &[IpmiEventSensorType] = &[
    // Threshold Based States
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x00,
        data: 0xff,
        desc: "Lower Non-critical going low ",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x01,
        data: 0xff,
        desc: "Lower Non-critical going high",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x02,
        data: 0xff,
        desc: "Lower Critical going low ",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x03,
        data: 0xff,
        desc: "Lower Critical going high",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x04,
        data: 0xff,
        desc: "Lower Non-recoverable going low ",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x05,
        data: 0xff,
        desc: "Lower Non-recoverable going high",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x06,
        data: 0xff,
        desc: "Upper Non-critical going low ",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x07,
        data: 0xff,
        desc: "Upper Non-critical going high",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x08,
        data: 0xff,
        desc: "Upper Critical going low ",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x09,
        data: 0xff,
        desc: "Upper Critical going high",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x0a,
        data: 0xff,
        desc: "Upper Non-recoverable going low ",
    },
    IpmiEventSensorType {
        code: 0x01,
        offset: 0x0b,
        data: 0xff,
        desc: "Upper Non-recoverable going high",
    },
    // DMI-based "usage state" States
    IpmiEventSensorType {
        code: 0x02,
        offset: 0x00,
        data: 0xff,
        desc: "Transition to Idle",
    },
    IpmiEventSensorType {
        code: 0x02,
        offset: 0x01,
        data: 0xff,
        desc: "Transition to Active",
    },
    IpmiEventSensorType {
        code: 0x02,
        offset: 0x02,
        data: 0xff,
        desc: "Transition to Busy",
    },
    // Digital-Discrete Event States
    IpmiEventSensorType {
        code: 0x03,
        offset: 0x00,
        data: 0xff,
        desc: "State Deasserted",
    },
    IpmiEventSensorType {
        code: 0x03,
        offset: 0x01,
        data: 0xff,
        desc: "State Asserted",
    },
    IpmiEventSensorType {
        code: 0x04,
        offset: 0x00,
        data: 0xff,
        desc: "Predictive Failure Deasserted",
    },
    IpmiEventSensorType {
        code: 0x04,
        offset: 0x01,
        data: 0xff,
        desc: "Predictive Failure Asserted",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x00,
        data: 0xff,
        desc: "Limit Not Exceeded",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x01,
        data: 0xff,
        desc: "Limit Exceeded",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x00,
        data: 0xff,
        desc: "Performance Met",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x01,
        data: 0xff,
        desc: "Performance Lags",
    },
    // Severity Event States
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x00,
        data: 0xff,
        desc: "Transition to OK",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x01,
        data: 0xff,
        desc: "Transition to Non-critical from OK",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x02,
        data: 0xff,
        desc: "Transition to Critical from less severe",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x03,
        data: 0xff,
        desc: "Transition to Non-recoverable from less severe",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x04,
        data: 0xff,
        desc: "Transition to Non-critical from more severe",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x05,
        data: 0xff,
        desc: "Transition to Critical from Non-recoverable",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x06,
        data: 0xff,
        desc: "Transition to Non-recoverable",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x07,
        data: 0xff,
        desc: "Monitor",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x08,
        data: 0xff,
        desc: "Informational",
    },
    // Availability Status States
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x00,
        data: 0xff,
        desc: "Device Absent",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x01,
        data: 0xff,
        desc: "Device Present",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x00,
        data: 0xff,
        desc: "Device Disabled",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x01,
        data: 0xff,
        desc: "Device Enabled",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x00,
        data: 0xff,
        desc: "Transition to Running",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x01,
        data: 0xff,
        desc: "Transition to In Test",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x02,
        data: 0xff,
        desc: "Transition to Power Off",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x03,
        data: 0xff,
        desc: "Transition to On Line",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x04,
        data: 0xff,
        desc: "Transition to Off Line",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x05,
        data: 0xff,
        desc: "Transition to Off Duty",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x06,
        data: 0xff,
        desc: "Transition to Degraded",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x07,
        data: 0xff,
        desc: "Transition to Power Save",
    },
    IpmiEventSensorType {
        code: 0x0a,
        offset: 0x08,
        data: 0xff,
        desc: "Install Error",
    },
    // Redundancy States
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x00,
        data: 0xff,
        desc: "Fully Redundant",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x01,
        data: 0xff,
        desc: "Redundancy Lost",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x02,
        data: 0xff,
        desc: "Redundancy Degraded",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x03,
        data: 0xff,
        desc: "Non-Redundant: Sufficient from Redundant",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x04,
        data: 0xff,
        desc: "Non-Redundant: Sufficient from Insufficient",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x05,
        data: 0xff,
        desc: "Non-Redundant: Insufficient Resources",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x06,
        data: 0xff,
        desc: "Redundancy Degraded from Fully Redundant",
    },
    IpmiEventSensorType {
        code: 0x0b,
        offset: 0x07,
        data: 0xff,
        desc: "Redundancy Degraded from Non-Redundant",
    },
    // ACPI Device Power States
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x00,
        data: 0xff,
        desc: "D0 Power State",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x01,
        data: 0xff,
        desc: "D1 Power State",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x02,
        data: 0xff,
        desc: "D2 Power State",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x03,
        data: 0xff,
        desc: "D3 Power State",
    },
    // END
    IpmiEventSensorType {
        code: 0x00,
        offset: 0x00,
        data: 0xff,
        desc: "",
    },
];

pub static SENSOR_SPECIFIC_EVENT_TYPES: &[IpmiEventSensorType] = &[
    // Physical Security
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x00,
        data: 0xff,
        desc: "General Chassis intrusion",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x01,
        data: 0xff,
        desc: "Drive Bay intrusion",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x02,
        data: 0xff,
        desc: "I/O Card area intrusion",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x03,
        data: 0xff,
        desc: "Processor area intrusion",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x04,
        data: 0xff,
        desc: "System unplugged from LAN",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x05,
        data: 0xff,
        desc: "Unauthorized dock",
    },
    IpmiEventSensorType {
        code: 0x05,
        offset: 0x06,
        data: 0xff,
        desc: "FAN area intrusion",
    },
    // Platform Security
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x00,
        data: 0xff,
        desc: "Front Panel Lockout violation attempted",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x01,
        data: 0xff,
        desc: "Pre-boot password violation - user password",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x02,
        data: 0xff,
        desc: "Pre-boot password violation - setup password",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x03,
        data: 0xff,
        desc: "Pre-boot password violation - network boot password",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x04,
        data: 0xff,
        desc: "Other pre-boot password violation",
    },
    IpmiEventSensorType {
        code: 0x06,
        offset: 0x05,
        data: 0xff,
        desc: "Out-of-band access password violation",
    },
    // Processor
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x00,
        data: 0xff,
        desc: "IERR",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x01,
        data: 0xff,
        desc: "Thermal Trip",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x02,
        data: 0xff,
        desc: "FRB1/BIST failure",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x03,
        data: 0xff,
        desc: "FRB2/Hang in POST failure",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x04,
        data: 0xff,
        desc: "FRB3/Processor startup/init failure",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x05,
        data: 0xff,
        desc: "Configuration Error",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x06,
        data: 0xff,
        desc: "SM BIOS Uncorrectable CPU-complex Error",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x07,
        data: 0xff,
        desc: "Presence detected",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x08,
        data: 0xff,
        desc: "Disabled",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x09,
        data: 0xff,
        desc: "Terminator presence detected",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x0a,
        data: 0xff,
        desc: "Throttled",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x0b,
        data: 0xff,
        desc: "Uncorrectable machine check exception",
    },
    IpmiEventSensorType {
        code: 0x07,
        offset: 0x0c,
        data: 0xff,
        desc: "Correctable machine check error",
    },
    // Power Supply
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x00,
        data: 0xff,
        desc: "Presence detected",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x01,
        data: 0xff,
        desc: "Failure detected",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x02,
        data: 0xff,
        desc: "Predictive failure",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x03,
        data: 0xff,
        desc: "Power Supply AC lost",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x04,
        data: 0xff,
        desc: "AC lost or out-of-range",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x05,
        data: 0xff,
        desc: "AC out-of-range, but present",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x06,
        data: 0x00,
        desc: "Config Error: Vendor Mismatch",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x06,
        data: 0x01,
        desc: "Config Error: Revision Mismatch",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x06,
        data: 0x02,
        desc: "Config Error: Processor Missing",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x06,
        data: 0x03,
        desc: "Config Error: Power Supply Rating Mismatch",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x06,
        data: 0x04,
        desc: "Config Error: Voltage Rating Mismatch",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x06,
        data: 0xff,
        desc: "Config Error",
    },
    IpmiEventSensorType {
        code: 0x08,
        offset: 0x07,
        data: 0xff,
        desc: "Power Supply Inactive",
    },
    // Power Unit
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x00,
        data: 0xff,
        desc: "Power off/down",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x01,
        data: 0xff,
        desc: "Power cycle",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x02,
        data: 0xff,
        desc: "240VA power down",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x03,
        data: 0xff,
        desc: "Interlock power down",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x04,
        data: 0xff,
        desc: "AC lost",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x05,
        data: 0xff,
        desc: "Soft-power control failure",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x06,
        data: 0xff,
        desc: "Failure detected",
    },
    IpmiEventSensorType {
        code: 0x09,
        offset: 0x07,
        data: 0xff,
        desc: "Predictive failure",
    },
    // Memory
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x00,
        data: 0xff,
        desc: "Correctable ECC",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x01,
        data: 0xff,
        desc: "Uncorrectable ECC",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x02,
        data: 0xff,
        desc: "Parity",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x03,
        data: 0xff,
        desc: "Memory Scrub Failed",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x04,
        data: 0xff,
        desc: "Memory Device Disabled",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x05,
        data: 0xff,
        desc: "Correctable ECC logging limit reached",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x06,
        data: 0xff,
        desc: "Presence Detected",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x07,
        data: 0xff,
        desc: "Configuration Error",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x08,
        data: 0xff,
        desc: "Spare",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x09,
        data: 0xff,
        desc: "Throttled",
    },
    IpmiEventSensorType {
        code: 0x0c,
        offset: 0x0a,
        data: 0xff,
        desc: "Critical Overtemperature",
    },
    // Drive Slot
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x00,
        data: 0xff,
        desc: "Drive Present",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x01,
        data: 0xff,
        desc: "Drive Fault",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x02,
        data: 0xff,
        desc: "Predictive Failure",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x03,
        data: 0xff,
        desc: "Hot Spare",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x04,
        data: 0xff,
        desc: "Parity Check In Progress",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x05,
        data: 0xff,
        desc: "In Critical Array",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x06,
        data: 0xff,
        desc: "In Failed Array",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x07,
        data: 0xff,
        desc: "Rebuild In Progress",
    },
    IpmiEventSensorType {
        code: 0x0d,
        offset: 0x08,
        data: 0xff,
        desc: "Rebuild Aborted",
    },
    // System Firmware Error
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x00,
        desc: "Unspecified",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x01,
        desc: "No system memory installed",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x02,
        desc: "No usable system memory",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x03,
        desc: "Unrecoverable IDE device failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x04,
        desc: "Unrecoverable system-board failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x05,
        desc: "Unrecoverable diskette failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x06,
        desc: "Unrecoverable hard-disk controller failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x07,
        desc: "Unrecoverable PS/2 or USB keyboard failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x08,
        desc: "Removable boot media not found",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x09,
        desc: "Unrecoverable video controller failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x0a,
        desc: "No video device selected",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x0b,
        desc: "BIOS corruption detected",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x0c,
        desc: "CPU voltage mismatch",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0x0d,
        desc: "CPU speed mismatch failure",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x00,
        data: 0xff,
        desc: "Unknown Error",
    },
    // System Firmware Hang
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x00,
        desc: "Unspecified",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x01,
        desc: "Memory initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x02,
        desc: "Hard-disk initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x03,
        desc: "Secondary CPU Initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x04,
        desc: "User authentication",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x05,
        desc: "User-initiated system setup",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x06,
        desc: "USB resource configuration",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x07,
        desc: "PCI resource configuration",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x08,
        desc: "Option ROM initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x09,
        desc: "Video initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x0a,
        desc: "Cache initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x0b,
        desc: "SMBus initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x0c,
        desc: "Keyboard controller initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x0d,
        desc: "Management controller initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x0e,
        desc: "Docking station attachment",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x0f,
        desc: "Enabling docking station",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x10,
        desc: "Docking station ejection",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x11,
        desc: "Disabling docking station",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x12,
        desc: "Calling operating system wake-up vector",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x13,
        desc: "System boot initiated",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x14,
        desc: "Motherboard initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x15,
        desc: "reserved",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x16,
        desc: "Floppy initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x17,
        desc: "Keyboard test",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x18,
        desc: "Pointing device test",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0x19,
        desc: "Primary CPU initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x01,
        data: 0xff,
        desc: "Unknown Hang",
    },
    // System Firmware Progress
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x00,
        desc: "Unspecified",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x01,
        desc: "Memory initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x02,
        desc: "Hard-disk initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x03,
        desc: "Secondary CPU Initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x04,
        desc: "User authentication",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x05,
        desc: "User-initiated system setup",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x06,
        desc: "USB resource configuration",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x07,
        desc: "PCI resource configuration",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x08,
        desc: "Option ROM initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x09,
        desc: "Video initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x0a,
        desc: "Cache initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x0b,
        desc: "SMBus initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x0c,
        desc: "Keyboard controller initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x0d,
        desc: "Management controller initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x0e,
        desc: "Docking station attachment",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x0f,
        desc: "Enabling docking station",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x10,
        desc: "Docking station ejection",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x11,
        desc: "Disabling docking station",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x12,
        desc: "Calling operating system wake-up vector",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x13,
        desc: "System boot initiated",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x14,
        desc: "Motherboard initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x15,
        desc: "reserved",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x16,
        desc: "Floppy initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x17,
        desc: "Keyboard test",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x18,
        desc: "Pointing device test",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0x19,
        desc: "Primary CPU initialization",
    },
    IpmiEventSensorType {
        code: 0x0f,
        offset: 0x02,
        data: 0xff,
        desc: "Unknown Progress",
    },
    // Event Logging Disabled
    IpmiEventSensorType {
        code: 0x10,
        offset: 0x00,
        data: 0xff,
        desc: "Correctable memory error logging disabled",
    },
    IpmiEventSensorType {
        code: 0x10,
        offset: 0x01,
        data: 0xff,
        desc: "Event logging disabled",
    },
    IpmiEventSensorType {
        code: 0x10,
        offset: 0x02,
        data: 0xff,
        desc: "Log area reset/cleared",
    },
    IpmiEventSensorType {
        code: 0x10,
        offset: 0x03,
        data: 0xff,
        desc: "All event logging disabled",
    },
    IpmiEventSensorType {
        code: 0x10,
        offset: 0x04,
        data: 0xff,
        desc: "Log full",
    },
    IpmiEventSensorType {
        code: 0x10,
        offset: 0x05,
        data: 0xff,
        desc: "Log almost full",
    },
    // Watchdog 1
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x00,
        data: 0xff,
        desc: "BIOS Reset",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x01,
        data: 0xff,
        desc: "OS Reset",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x02,
        data: 0xff,
        desc: "OS Shut Down",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x03,
        data: 0xff,
        desc: "OS Power Down",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x04,
        data: 0xff,
        desc: "OS Power Cycle",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x05,
        data: 0xff,
        desc: "OS NMI/Diag Interrupt",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x06,
        data: 0xff,
        desc: "OS Expired",
    },
    IpmiEventSensorType {
        code: 0x11,
        offset: 0x07,
        data: 0xff,
        desc: "OS pre-timeout Interrupt",
    },
    // System Event
    IpmiEventSensorType {
        code: 0x12,
        offset: 0x00,
        data: 0xff,
        desc: "System Reconfigured",
    },
    IpmiEventSensorType {
        code: 0x12,
        offset: 0x01,
        data: 0xff,
        desc: "OEM System boot event",
    },
    IpmiEventSensorType {
        code: 0x12,
        offset: 0x02,
        data: 0xff,
        desc: "Undetermined system hardware failure",
    },
    IpmiEventSensorType {
        code: 0x12,
        offset: 0x03,
        data: 0xff,
        desc: "Entry added to auxiliary log",
    },
    IpmiEventSensorType {
        code: 0x12,
        offset: 0x04,
        data: 0xff,
        desc: "PEF Action",
    },
    IpmiEventSensorType {
        code: 0x12,
        offset: 0x05,
        data: 0xff,
        desc: "Timestamp Clock Sync",
    },
    // Critical Interrupt
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x00,
        data: 0xff,
        desc: "NMI/Diag Interrupt",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x01,
        data: 0xff,
        desc: "Bus Timeout",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x02,
        data: 0xff,
        desc: "I/O Channel check NMI",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x03,
        data: 0xff,
        desc: "Software NMI",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x04,
        data: 0xff,
        desc: "PCI PERR",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x05,
        data: 0xff,
        desc: "PCI SERR",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x06,
        data: 0xff,
        desc: "EISA failsafe timeout",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x07,
        data: 0xff,
        desc: "Bus Correctable error",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x08,
        data: 0xff,
        desc: "Bus Uncorrectable error",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x09,
        data: 0xff,
        desc: "Fatal NMI",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x0a,
        data: 0xff,
        desc: "Bus Fatal Error",
    },
    IpmiEventSensorType {
        code: 0x13,
        offset: 0x0b,
        data: 0xff,
        desc: "Bus Degraded",
    },
    // Button
    IpmiEventSensorType {
        code: 0x14,
        offset: 0x00,
        data: 0xff,
        desc: "Power Button pressed",
    },
    IpmiEventSensorType {
        code: 0x14,
        offset: 0x01,
        data: 0xff,
        desc: "Sleep Button pressed",
    },
    IpmiEventSensorType {
        code: 0x14,
        offset: 0x02,
        data: 0xff,
        desc: "Reset Button pressed",
    },
    IpmiEventSensorType {
        code: 0x14,
        offset: 0x03,
        data: 0xff,
        desc: "FRU Latch",
    },
    IpmiEventSensorType {
        code: 0x14,
        offset: 0x04,
        data: 0xff,
        desc: "FRU Service",
    },
    // Chip Set
    IpmiEventSensorType {
        code: 0x19,
        offset: 0x00,
        data: 0xff,
        desc: "Soft Power Control Failure",
    },
    IpmiEventSensorType {
        code: 0x19,
        offset: 0x01,
        data: 0xff,
        desc: "Thermal Trip",
    },
    // Cable/Interconnect
    IpmiEventSensorType {
        code: 0x1b,
        offset: 0x00,
        data: 0xff,
        desc: "Connected",
    },
    IpmiEventSensorType {
        code: 0x1b,
        offset: 0x01,
        data: 0xff,
        desc: "Config Error",
    },
    // System Boot Initiated
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x00,
        data: 0xff,
        desc: "Initiated by power up",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x01,
        data: 0xff,
        desc: "Initiated by hard reset",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x02,
        data: 0xff,
        desc: "Initiated by warm reset",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x03,
        data: 0xff,
        desc: "User requested PXE boot",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x04,
        data: 0xff,
        desc: "Automatic boot to diagnostic",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x05,
        data: 0xff,
        desc: "OS initiated hard reset",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x06,
        data: 0xff,
        desc: "OS initiated warm reset",
    },
    IpmiEventSensorType {
        code: 0x1d,
        offset: 0x07,
        data: 0xff,
        desc: "System Restart",
    },
    // Boot Error
    IpmiEventSensorType {
        code: 0x1e,
        offset: 0x00,
        data: 0xff,
        desc: "No bootable media",
    },
    IpmiEventSensorType {
        code: 0x1e,
        offset: 0x01,
        data: 0xff,
        desc: "Non-bootable disk in drive",
    },
    IpmiEventSensorType {
        code: 0x1e,
        offset: 0x02,
        data: 0xff,
        desc: "PXE server not found",
    },
    IpmiEventSensorType {
        code: 0x1e,
        offset: 0x03,
        data: 0xff,
        desc: "Invalid boot sector",
    },
    IpmiEventSensorType {
        code: 0x1e,
        offset: 0x04,
        data: 0xff,
        desc: "Timeout waiting for selection",
    },
    // OS Boot
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x00,
        data: 0xff,
        desc: "A: boot completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x01,
        data: 0xff,
        desc: "C: boot completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x02,
        data: 0xff,
        desc: "PXE boot completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x03,
        data: 0xff,
        desc: "Diagnostic boot completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x04,
        data: 0xff,
        desc: "CD-ROM boot completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x05,
        data: 0xff,
        desc: "ROM boot completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x06,
        data: 0xff,
        desc: "boot completed - device not specified",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x07,
        data: 0xff,
        desc: "Installation started",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x08,
        data: 0xff,
        desc: "Installation completed",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x09,
        data: 0xff,
        desc: "Installation aborted",
    },
    IpmiEventSensorType {
        code: 0x1f,
        offset: 0x0a,
        data: 0xff,
        desc: "Installation failed",
    },
    // OS Stop/Shutdown
    IpmiEventSensorType {
        code: 0x20,
        offset: 0x00,
        data: 0xff,
        desc: "Error during system startup",
    },
    IpmiEventSensorType {
        code: 0x20,
        offset: 0x01,
        data: 0xff,
        desc: "Run-time critical stop",
    },
    IpmiEventSensorType {
        code: 0x20,
        offset: 0x02,
        data: 0xff,
        desc: "OS graceful stop",
    },
    IpmiEventSensorType {
        code: 0x20,
        offset: 0x03,
        data: 0xff,
        desc: "OS graceful shutdown",
    },
    IpmiEventSensorType {
        code: 0x20,
        offset: 0x04,
        data: 0xff,
        desc: "PEF initiated soft shutdown",
    },
    IpmiEventSensorType {
        code: 0x20,
        offset: 0x05,
        data: 0xff,
        desc: "Agent not responding",
    },
    // Slot/Connector
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x00,
        data: 0xff,
        desc: "Fault Status",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x01,
        data: 0xff,
        desc: "Identify Status",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x02,
        data: 0xff,
        desc: "Device Installed",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x03,
        data: 0xff,
        desc: "Ready for Device Installation",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x04,
        data: 0xff,
        desc: "Ready for Device Removal",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x05,
        data: 0xff,
        desc: "Slot Power is Off",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x06,
        data: 0xff,
        desc: "Device Removal Request",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x07,
        data: 0xff,
        desc: "Interlock",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x08,
        data: 0xff,
        desc: "Slot is Disabled",
    },
    IpmiEventSensorType {
        code: 0x21,
        offset: 0x09,
        data: 0xff,
        desc: "Spare Device",
    },
    // System ACPI Power State
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x00,
        data: 0xff,
        desc: "S0/G0: working",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x01,
        data: 0xff,
        desc: "S1: sleeping with system hw & processor context maintained",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x02,
        data: 0xff,
        desc: "S2: sleeping, processor context lost",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x03,
        data: 0xff,
        desc: "S3: sleeping, processor & hw context lost, memory retained",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x04,
        data: 0xff,
        desc: "S4: non-volatile sleep/suspend-to-disk",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x05,
        data: 0xff,
        desc: "S5/G2: soft-off",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x06,
        data: 0xff,
        desc: "S4/S5: soft-off",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x07,
        data: 0xff,
        desc: "G3: mechanical off",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x08,
        data: 0xff,
        desc: "Sleeping in S1/S2/S3 state",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x09,
        data: 0xff,
        desc: "G1: sleeping",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x0a,
        data: 0xff,
        desc: "S5: entered by override",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x0b,
        data: 0xff,
        desc: "Legacy ON state",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x0c,
        data: 0xff,
        desc: "Legacy OFF state",
    },
    IpmiEventSensorType {
        code: 0x22,
        offset: 0x0e,
        data: 0xff,
        desc: "Unknown",
    },
    // Watchdog 2
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x00,
        data: 0xff,
        desc: "Timer expired",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x01,
        data: 0xff,
        desc: "Hard reset",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x02,
        data: 0xff,
        desc: "Power down",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x03,
        data: 0xff,
        desc: "Power cycle",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x04,
        data: 0xff,
        desc: "reserved",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x05,
        data: 0xff,
        desc: "reserved",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x06,
        data: 0xff,
        desc: "reserved",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x07,
        data: 0xff,
        desc: "reserved",
    },
    IpmiEventSensorType {
        code: 0x23,
        offset: 0x08,
        data: 0xff,
        desc: "Timer interrupt",
    },
    // Platform Alert
    IpmiEventSensorType {
        code: 0x24,
        offset: 0x00,
        data: 0xff,
        desc: "Platform generated page",
    },
    IpmiEventSensorType {
        code: 0x24,
        offset: 0x01,
        data: 0xff,
        desc: "Platform generated LAN alert",
    },
    IpmiEventSensorType {
        code: 0x24,
        offset: 0x02,
        data: 0xff,
        desc: "Platform Event Trap generated",
    },
    IpmiEventSensorType {
        code: 0x24,
        offset: 0x03,
        data: 0xff,
        desc: "Platform generated SNMP trap, OEM format",
    },
    // Entity Presence
    IpmiEventSensorType {
        code: 0x25,
        offset: 0x00,
        data: 0xff,
        desc: "Present",
    },
    IpmiEventSensorType {
        code: 0x25,
        offset: 0x01,
        data: 0xff,
        desc: "Absent",
    },
    IpmiEventSensorType {
        code: 0x25,
        offset: 0x02,
        data: 0xff,
        desc: "Disabled",
    },
    // LAN
    IpmiEventSensorType {
        code: 0x27,
        offset: 0x00,
        data: 0xff,
        desc: "Heartbeat Lost",
    },
    IpmiEventSensorType {
        code: 0x27,
        offset: 0x01,
        data: 0xff,
        desc: "Heartbeat",
    },
    // Management Subsystem Health
    IpmiEventSensorType {
        code: 0x28,
        offset: 0x00,
        data: 0xff,
        desc: "Sensor access degraded or unavailable",
    },
    IpmiEventSensorType {
        code: 0x28,
        offset: 0x01,
        data: 0xff,
        desc: "Controller access degraded or unavailable",
    },
    IpmiEventSensorType {
        code: 0x28,
        offset: 0x02,
        data: 0xff,
        desc: "Management controller off-line",
    },
    IpmiEventSensorType {
        code: 0x28,
        offset: 0x03,
        data: 0xff,
        desc: "Management controller unavailable",
    },
    IpmiEventSensorType {
        code: 0x28,
        offset: 0x04,
        data: 0xff,
        desc: "Sensor failure",
    },
    IpmiEventSensorType {
        code: 0x28,
        offset: 0x05,
        data: 0xff,
        desc: "FRU failure",
    },
    // Battery
    IpmiEventSensorType {
        code: 0x29,
        offset: 0x00,
        data: 0xff,
        desc: "Low",
    },
    IpmiEventSensorType {
        code: 0x29,
        offset: 0x01,
        data: 0xff,
        desc: "Failed",
    },
    IpmiEventSensorType {
        code: 0x29,
        offset: 0x02,
        data: 0xff,
        desc: "Presence Detected",
    },
    // Version Change
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x00,
        data: 0xff,
        desc: "Hardware change detected",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x00,
        desc: "Firmware or software change detected",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x01,
        desc: "Firmware or software change detected, Mngmt Ctrl Dev Id",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x02,
        desc: "Firmware or software change detected, Mngmt Ctrl Firm Rev",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x03,
        desc: "Firmware or software change detected, Mngmt Ctrl Dev Rev",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x04,
        desc: "Firmware or software change detected, Mngmt Ctrl Manuf Id",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x05,
        desc: "Firmware or software change detected, Mngmt Ctrl IPMI Vers",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x06,
        desc: "Firmware or software change detected, Mngmt Ctrl Aux Firm Id",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x07,
        desc: "Firmware or software change detected, Mngmt Ctrl Firm Boot Block",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x08,
        desc: "Firmware or software change detected, Mngmt Ctrl Other",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x09,
        desc: "Firmware or software change detected, BIOS/EFI change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x0A,
        desc: "Firmware or software change detected, SMBIOS change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x0B,
        desc: "Firmware or software change detected, O/S change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x0C,
        desc: "Firmware or software change detected, O/S loader change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x0D,
        desc: "Firmware or software change detected, Service Diag change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x0E,
        desc: "Firmware or software change detected, Mngmt SW agent change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x0F,
        desc: "Firmware or software change detected, Mngmt SW App change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x10,
        desc: "Firmware or software change detected, Mngmt SW Middle",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x11,
        desc: "Firmware or software change detected, Prog HW Change (FPGA)",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x12,
        desc: "Firmware or software change detected, board/FRU module change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x13,
        desc: "Firmware or software change detected, board/FRU component change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x14,
        desc: "Firmware or software change detected, board/FRU replace equ ver",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x15,
        desc: "Firmware or software change detected, board/FRU replace new ver",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x16,
        desc: "Firmware or software change detected, board/FRU replace old ver",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x01,
        data: 0x17,
        desc: "Firmware or software change detected, board/FRU HW conf change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x02,
        data: 0xff,
        desc: "Hardware incompatibility detected",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x03,
        data: 0xff,
        desc: "Firmware or software incompatibility detected",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x04,
        data: 0xff,
        desc: "Invalid or unsupported hardware version",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x05,
        data: 0xff,
        desc: "Invalid or unsupported firmware or software version",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x06,
        data: 0xff,
        desc: "Hardware change success",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x00,
        desc: "Firmware or software change success",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x01,
        desc: "Firmware or software change success, Mngmt Ctrl Dev Id",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x02,
        desc: "Firmware or software change success, Mngmt Ctrl Firm Rev",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x03,
        desc: "Firmware or software change success, Mngmt Ctrl Dev Rev",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x04,
        desc: "Firmware or software change success, Mngmt Ctrl Manuf Id",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x05,
        desc: "Firmware or software change success, Mngmt Ctrl IPMI Vers",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x06,
        desc: "Firmware or software change success, Mngmt Ctrl Aux Firm Id",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x07,
        desc: "Firmware or software change success, Mngmt Ctrl Firm Boot Block",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x08,
        desc: "Firmware or software change success, Mngmt Ctrl Other",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x09,
        desc: "Firmware or software change success, BIOS/EFI change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x0A,
        desc: "Firmware or software change success, SMBIOS change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x0B,
        desc: "Firmware or software change success, O/S change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x0C,
        desc: "Firmware or software change success, O/S loader change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x0D,
        desc: "Firmware or software change success, Service Diag change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x0E,
        desc: "Firmware or software change success, Mngmt SW agent change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x0F,
        desc: "Firmware or software change success, Mngmt SW App change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x10,
        desc: "Firmware or software change success, Mngmt SW Middle",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x11,
        desc: "Firmware or software change success, Prog HW Change (FPGA)",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x12,
        desc: "Firmware or software change success, board/FRU module change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x13,
        desc: "Firmware or software change success, board/FRU component change",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x14,
        desc: "Firmware or software change success, board/FRU replace equ ver",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x15,
        desc: "Firmware or software change success, board/FRU replace new ver",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x16,
        desc: "Firmware or software change success, board/FRU replace old ver",
    },
    IpmiEventSensorType {
        code: 0x2b,
        offset: 0x07,
        data: 0x17,
        desc: "Firmware or software change success, board/FRU HW conf change",
    },
    // FRU State
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x00,
        data: 0xff,
        desc: "Not Installed",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x01,
        data: 0xff,
        desc: "Inactive",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x02,
        data: 0xff,
        desc: "Activation Requested",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x03,
        data: 0xff,
        desc: "Activation in Progress",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x04,
        data: 0xff,
        desc: "Active",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x05,
        data: 0xff,
        desc: "Deactivation Requested",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x06,
        data: 0xff,
        desc: "Deactivation in Progress",
    },
    IpmiEventSensorType {
        code: 0x2c,
        offset: 0x07,
        data: 0xff,
        desc: "Communication lost",
    },
    // PICMG FRU Hot Swap
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x00,
        data: 0xFF,
        desc: "Transition to M0",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x01,
        data: 0xFF,
        desc: "Transition to M1",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x02,
        data: 0xFF,
        desc: "Transition to M2",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x03,
        data: 0xFF,
        desc: "Transition to M3",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x04,
        data: 0xFF,
        desc: "Transition to M4",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x05,
        data: 0xFF,
        desc: "Transition to M5",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x06,
        data: 0xFF,
        desc: "Transition to M6",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x07,
        data: 0xFF,
        desc: "Transition to M7",
    },
    // PICMG IPMB Physical Link
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x00,
        data: 0xff,
        desc: "IPMB-A disabled, IPMB-B disabled",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x01,
        data: 0xff,
        desc: "IPMB-A enabled, IPMB-B disabled",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x02,
        data: 0xff,
        desc: "IPMB-A disabled, IPMB-B enabled",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x03,
        data: 0xff,
        desc: "IPMB-A enabled, IPMB-B enabled",
    },
    // PICMG Module Hot Swap
    IpmiEventSensorType {
        code: 0xF2,
        offset: 0x00,
        data: 0xff,
        desc: "Module Handle Closed",
    },
    IpmiEventSensorType {
        code: 0xF2,
        offset: 0x01,
        data: 0xff,
        desc: "Module Handle Opened",
    },
    IpmiEventSensorType {
        code: 0xF2,
        offset: 0x02,
        data: 0xff,
        desc: "Quiesced",
    },
    // 终止条目
    IpmiEventSensorType {
        code: 0x00,
        offset: 0x00,
        data: 0xff,
        desc: "",
    },
];

// 其余数组同理，下面是一个例子
pub const VITA_SENSOR_EVENT_TYPES: &[IpmiEventSensorType] = &[
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x00,
        data: 0xFF,
        desc: "Transition to M0",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x01,
        data: 0xFF,
        desc: "Transition to M1",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x04,
        data: 0xFF,
        desc: "Transition to M4",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x05,
        data: 0xFF,
        desc: "Transition to M5",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x06,
        data: 0xFF,
        desc: "Transition to M6",
    },
    IpmiEventSensorType {
        code: 0xF0,
        offset: 0x07,
        data: 0xFF,
        desc: "Transition to M7",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x00,
        data: 0xFF,
        desc: "IPMB-A disabled, IPMB-B disabled",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x01,
        data: 0xFF,
        desc: "IPMB-A enabled, IPMB-B disabled",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x02,
        data: 0xFF,
        desc: "IPMB-A disabled, IPMB-B enabled",
    },
    IpmiEventSensorType {
        code: 0xF1,
        offset: 0x03,
        data: 0xFF,
        desc: "IPMB-A enabled, IPMB-B enabled",
    },
    IpmiEventSensorType {
        code: 0xF3,
        offset: 0x00,
        data: 0xff,
        desc: "At or below Lower Non-critical",
    },
    IpmiEventSensorType {
        code: 0xF3,
        offset: 0x01,
        data: 0xff,
        desc: "At or below Lower Critical",
    },
    IpmiEventSensorType {
        code: 0xF3,
        offset: 0x02,
        data: 0xff,
        desc: "At or below Lower Non-recoverable",
    },
    IpmiEventSensorType {
        code: 0xF3,
        offset: 0x03,
        data: 0xff,
        desc: "At or above Upper Non-critical",
    },
    IpmiEventSensorType {
        code: 0xF3,
        offset: 0x04,
        data: 0xff,
        desc: "At or above Upper Critical",
    },
    IpmiEventSensorType {
        code: 0xF3,
        offset: 0x05,
        data: 0xff,
        desc: "At or above Upper Non-recoverable",
    },
    IpmiEventSensorType {
        code: 0x00,
        offset: 0x00,
        data: 0xff,
        desc: "",
    },
];

// 其它数组（sensor_specific_event_types, oem_kontron_event_types）同理转换即可
pub const OEM_KONTRON_EVENT_TYPES: &[IpmiEventSensorType] = &[
    // Board Reset(cPCI)
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x00,
        data: 0xff,
        desc: "Push Button",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x01,
        data: 0xff,
        desc: "Bridge Reset",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x02,
        data: 0xff,
        desc: "Backplane",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x03,
        data: 0xff,
        desc: "Hotswap Fault",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x04,
        data: 0xff,
        desc: "Hotswap Healty",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x05,
        data: 0xff,
        desc: "Unknown",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x06,
        data: 0xff,
        desc: "ITP",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x07,
        data: 0xff,
        desc: "Hardware Watchdog",
    },
    IpmiEventSensorType {
        code: 0xC1,
        offset: 0x08,
        data: 0xff,
        desc: "Software Reset",
    },
    // IPMB-L Link State, based on PICMG IPMB-0 Link state sensor
    IpmiEventSensorType {
        code: 0xC3,
        offset: 0x02,
        data: 0xff,
        desc: "IPMB L Disabled",
    },
    IpmiEventSensorType {
        code: 0xC3,
        offset: 0x03,
        data: 0xff,
        desc: "IPMB L Enabled",
    },
    // Board Reset
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x00,
        data: 0xff,
        desc: "Push Button",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x01,
        data: 0xff,
        desc: "Hardware Power Failure",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x02,
        data: 0xff,
        desc: "Unknown",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x03,
        data: 0xff,
        desc: "Hardware Watchdog",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x04,
        data: 0xff,
        desc: "Soft Reset",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x05,
        data: 0xff,
        desc: "Warm Reset",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x06,
        data: 0xff,
        desc: "Cold Reset",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x07,
        data: 0xff,
        desc: "IPMI Command",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x08,
        data: 0xff,
        desc: "Setup Reset (Save CMOS)",
    },
    IpmiEventSensorType {
        code: 0xC4,
        offset: 0x09,
        data: 0xff,
        desc: "Power Up Reset",
    },
    // POST Value
    IpmiEventSensorType {
        code: 0xC6,
        offset: 0x0E,
        data: 0xff,
        desc: "Post Error (see data2)",
    },
    // FWUM Status
    IpmiEventSensorType {
        code: 0xC7,
        offset: 0x00,
        data: 0xff,
        desc: "First Boot After Upgrade",
    },
    IpmiEventSensorType {
        code: 0xC7,
        offset: 0x01,
        data: 0xff,
        desc: "First Boot After Rollback(error)",
    },
    IpmiEventSensorType {
        code: 0xC7,
        offset: 0x02,
        data: 0xff,
        desc: "First Boot After Errors (watchdog)",
    },
    IpmiEventSensorType {
        code: 0xC7,
        offset: 0x03,
        data: 0xff,
        desc: "First Boot After Manual Rollback",
    },
    IpmiEventSensorType {
        code: 0xC7,
        offset: 0x08,
        data: 0xff,
        desc: "Firmware Watchdog Bite, reset occurred",
    },
    // Switch Mngt Software Status
    IpmiEventSensorType {
        code: 0xC8,
        offset: 0x00,
        data: 0xff,
        desc: "Not Loaded",
    },
    IpmiEventSensorType {
        code: 0xC8,
        offset: 0x01,
        data: 0xff,
        desc: "Initializing",
    },
    IpmiEventSensorType {
        code: 0xC8,
        offset: 0x02,
        data: 0xff,
        desc: "Ready",
    },
    IpmiEventSensorType {
        code: 0xC8,
        offset: 0x03,
        data: 0xff,
        desc: "Failure (see data2)",
    },
    // Diagnostic Status
    IpmiEventSensorType {
        code: 0xC9,
        offset: 0x00,
        data: 0xff,
        desc: "Started",
    },
    IpmiEventSensorType {
        code: 0xC9,
        offset: 0x01,
        data: 0xff,
        desc: "Pass",
    },
    IpmiEventSensorType {
        code: 0xC9,
        offset: 0x02,
        data: 0xff,
        desc: "Fail",
    },
    IpmiEventSensorType {
        code: 0xCA,
        offset: 0x00,
        data: 0xff,
        desc: "In progress",
    },
    IpmiEventSensorType {
        code: 0xCA,
        offset: 0x01,
        data: 0xff,
        desc: "Success",
    },
    IpmiEventSensorType {
        code: 0xCA,
        offset: 0x02,
        data: 0xff,
        desc: "Failure",
    },
    // FRU Over Current
    IpmiEventSensorType {
        code: 0xCB,
        offset: 0x00,
        data: 0xff,
        desc: "Asserted",
    },
    IpmiEventSensorType {
        code: 0xCB,
        offset: 0x01,
        data: 0xff,
        desc: "Deasserted",
    },
    // FRU Sensor Error
    IpmiEventSensorType {
        code: 0xCC,
        offset: 0x00,
        data: 0xff,
        desc: "Asserted",
    },
    IpmiEventSensorType {
        code: 0xCC,
        offset: 0x01,
        data: 0xff,
        desc: "Deasserted",
    },
    // FRU Power Denied
    IpmiEventSensorType {
        code: 0xCD,
        offset: 0x00,
        data: 0xff,
        desc: "Asserted",
    },
    IpmiEventSensorType {
        code: 0xCD,
        offset: 0x01,
        data: 0xff,
        desc: "Deasserted",
    },
    // Reset
    IpmiEventSensorType {
        code: 0xCF,
        offset: 0x00,
        data: 0xff,
        desc: "Asserted",
    },
    IpmiEventSensorType {
        code: 0xCF,
        offset: 0x01,
        data: 0xff,
        desc: "Deasserted",
    },
    // END
    IpmiEventSensorType {
        code: 0x00,
        offset: 0x00,
        data: 0xff,
        desc: "",
    },
];
